{% extends "base.html" %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">新增售后服务记录</h4>
                </div>
                <div class="card-body">
                    <form method="POST">
                        <div class="mb-3">
                            <label class="form-label">订单号</label>
                            <input type="text" class="form-control" name="order_id" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">客户名称</label>
                            <input type="text" class="form-control" name="customer_name" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">联系电话</label>
                            <input type="text" class="form-control" name="contact_phone" required>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">服务类型</label>
                            <select class="form-select" name="service_type" required>
                                <option value="complaint">投诉</option>
                                <option value="return">退货</option>
                                <option value="repair">维修</option>
                            </select>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">优先级</label>
                            <select class="form-select" name="priority" required>
                                <option value="low">低</option>
                                <option value="normal" selected>普通</option>
                                <option value="high">高</option>
                                <option value="urgent">紧急</option>
                            </select>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">问题描述</label>
                            <textarea class="form-control" name="description" rows="4" required></textarea>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">备注</label>
                            <textarea class="form-control" name="notes" rows="3"></textarea>
                        </div>
                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-primary">提交</button>
                            <a href="{{ url_for('service.service_list') }}" class="btn btn-secondary">返回</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 